package com.xbongbong.paas.manager.feign;

import com.xbongbong.pro.businessrule.pojo.dto.OperationDTO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.message.pojo.vo.MessageRabbitMqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/5/7 16:31
 * @since v1.0
 */
@FeignClient(name = "pro-web-ai-jobs",contextId = "businessRuleFeignClient")
public interface BusinessRuleFeignClient {

    /**
     * 业务规则记录日志
     * @author 吴峰
     * @date 2020/5/9 16:37
     * @param operationDTO
     * @return com.xbongbong.paas.toolbox.wrap.XbbResponse<com.xbongbong.pro.message.pojo.vo.MessageRabbitMqVO>
     * @throws XbbException 业务异常
     */
    @RequestMapping(value = "/pro/v1/businessRuleLog/add", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ResponseBody
    XbbResponse<MessageRabbitMqVO> addLog(@RequestBody OperationDTO operationDTO) throws XbbException;
}
